package com.fourhats.services.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

public class PostDto {
	
	private Long id;
	private String title;
	private String subtitle;
	private String description;
	private Date creationDate;
	private String formattedCreationDate;
	private String imagePath;
	
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getTitle() {
		return title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getSubtitle() {
		return subtitle;
	}
	
	public void setSubtitle(String subtitle) {
		this.subtitle = subtitle;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Date getCreationDate() {
		return creationDate;
	}
	
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
		SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
		this.setFormattedCreationDate(format.format(creationDate));
	}
	
	public String getFormattedCreationDate() {
		return formattedCreationDate;
	}
	
	public void setFormattedCreationDate(String formattedCreationDate) {
		this.formattedCreationDate = formattedCreationDate;
	}
	
	public String getImagePath() {
		return imagePath;
	}
	
	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}
}
